package com.icangya.domain;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "rw_shop")
public class Rwshop {//商品表

    private long id;//ID

    private String shopName;//商品名称

    private int price;//商品单价

    private int oldPrice;//商品原价

    private int expressFee;//邮费

    private String remark;//备注

    private long numPiece;//剩余商品数量

    private Timestamp createTime;//创建时间

    private String intro;//商品简介

    private String status;//是否上架，1：已上架，0：已下架

    private String mainPic;//商品主图；

    private String bigPic;//商品大图；

    private int salesNum;//销售基数

    private int addNumToSales;//以此基数按时提高销售基数

    private  long shopId;//对应升级商品的id

    private String upShopPic;//对应升级商品的主图



    @Basic
    @Column(name = "old_price")
    public int getOldPrice() {
        return oldPrice;
    }

    public void setOldPrice(int oldPrice) {
        this.oldPrice = oldPrice;
    }

    @Basic
    @Column(name = "express_fee")
    public int getExpressFee() {
        return expressFee;
    }

    public void setExpressFee(int expressFee) {
        this.expressFee = expressFee;
    }

    @Basic
    @Column(name = "sales_num")
    public int getSalesNum() {
        return salesNum;
    }

    public void setSalesNum(int salesNum) {
        this.salesNum = salesNum;
    }

    @Basic
    @Column(name = "add_num_to_sales")
    public int getAddNumToSales() {
        return addNumToSales;
    }

    public void setAddNumToSales(int addNumToSales) {
        this.addNumToSales = addNumToSales;
    }

    @Basic
    @Column(name = "big_pic")
    public String getBigPic() {
        return bigPic;
    }

    public void setBigPic(String bigPic) {
        this.bigPic = bigPic;
    }

    @Basic
    @Column(name = "main_pic")
    public String getMainPic() {
        return mainPic;
    }

    public void setMainPic(String mainPic) {
        this.mainPic = mainPic;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "shop_name")
    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }
    @Basic
    @Column(name = "price")
    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    @Basic
    @Column(name = "num_piecs")
    public long getNumPiece() {
        return numPiece;
    }

    public void setNumPiece(long numPiece) {
        this.numPiece = numPiece;
    }
    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
    @Basic
    @Column(name = "intro")
    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }
    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "shop_id")
    public long getShopId() {
        return shopId;
    }

    public void setShopId(long shopId) {
        this.shopId = shopId;
    }
    @Basic
    @Column(name = "upshop_pic")
    public String getUpShopPic() {
        return upShopPic;
    }

    public void setUpShopPic(String upShopPic) {
        this.upShopPic = upShopPic;
    }

    public Rwshop() {
    }

    public Rwshop(String shopName, int price, int oldPrice, int expressFee, String remark, long numPiece,
                  Timestamp createTime, String intro, String status, String mainPic, String bigPic, int salesNum, int addNumToSales, long shopId, String upShopPic) {
        this.shopName = shopName;
        this.price = price;
        this.oldPrice = oldPrice;
        this.expressFee = expressFee;
        this.remark = remark;
        this.numPiece = numPiece;
        this.createTime = createTime;
        this.intro = intro;
        this.status = status;
        this.mainPic = mainPic;
        this.bigPic = bigPic;
        this.salesNum = salesNum;
        this.addNumToSales = addNumToSales;
        this.shopId = shopId;
        this.upShopPic = upShopPic;
    }

    @Override
    public String toString() {
        return "Rwshop{" +
                "id=" + id +
                ", shopName='" + shopName + '\'' +
                ", price=" + price +
                ", oldPrice=" + oldPrice +
                ", expressFee=" + expressFee +
                ", remark='" + remark + '\'' +
                ", numPiece=" + numPiece +
                ", createTime=" + createTime +
                ", intro='" + intro + '\'' +
                ", status='" + status + '\'' +
                ", mainPic='" + mainPic + '\'' +
                ", bigPic='" + bigPic + '\'' +
                ", salesNum=" + salesNum +
                ", addNumToSales=" + addNumToSales +
                '}';
    }
}
